<?php
/*  
  Copyright (c) 2010-02 SongCMS 
  SongCMS All Rights Reserved. 
  Support:www.SongCMS.com
  QQ:544255858   19951025
  Author:Song  Version:3.17
  Date:2010-08-12 09:28:32
*/

include_once('Admin.php');
include_once('../config/field.php');
$page_field = $customize_field['page']; //自定义字段
$aRs = $db->SelectSQL("SELECT * FROM `{$dbprefix}article` WHERE `ID` = '" . $_GET['ID'] . "'",1);
$aRs = array_shift($aRs);
if (count($aRs)==0) MsgBox (1,'该内容不存在或者已经删除！','-1');
$LangName = $WebLangKind > 1 ?  '(' . $WebLangName[$aRs['ArticleLang']-1] . ')' : NULL;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./images/adminstyle.css" rel="stylesheet" type="text/css" />
<link rel="Shortcut Icon" href="../favicon.ico">
<link rel="Bookmark" href="../favicon.ico">
<script src="../js/csshovernotie6.js" type="text/javascript"></script>
<script src="../tools/highslide/highslide.js" type="text/javascript"></script>
<script type="text/javascript">
hs.graphicsDir = '../tools/highslide/graphics/';
hs.showCredits = false;
hs.outlineType = 'rounded-white';
hs.restoreTitle = '关闭';
</script>
</head>
<body>
<br />
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="1">
	<tr><td align="right">
		<input type="button" value="发布内容" onClick="javascript:location.href='PageAdd.php?Lang=<?php echo $Lang?>'">
		<input type="button" value="内容管理" onClick="javascript:location.href='PageManage.php?Lang=<?php echo $Lang?>'">		
		<input type="button" value="栏目管理" onClick="javascript:location.href='PageColumnManage.php?Lang=<?php echo $Lang?>'">
	</td></tr>
</table>
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
  <tr class="odd">
    <td colspan="2" align="center" class="Main_Title">页面内容预览<?php echo $LangName?></td>
  </tr>
<?php if($WebLangKind>1) {?>
  <tr class="odd">
    <td width="120" height="22" align="right">站点语言：</td>
    <td><?php echo $WebLangName[$aRs['ArticleLang']-1];?></td>
  </tr>
<?php }?>
  <tr class="odd">
    <td width="120" height="22" align="right">所属栏目：</td>
    <td><?php echo Html($aRs['ArticleRela']);?></td>
  </tr>
  <tr class="odd">
    <td height="22" align="right">内容标题：</td>
    <td><?php echo $aRs['ArticleTitle'];?></td>
  </tr>  
<?php if($ConfigArticleImg==1){?>  
  <tr class="odd">
  	<td height="22" align="right">缩 略 图：</td>
  	<td>
<?php
if(file_exists("../{$aRs['ArticleImg']}") && !empty($aRs['ArticleImg'])){
	echo "<a href=\"../{$aRs['ArticleImg']}\" onclick=\"return hs.expand(this);\"><img src=\"../{$aRs['ArticleImg']}\" width=\"160\" border=\"0\"></a>";	
} else {
	echo '<img src="images/noimg.gif" width="150" height="150" border="0" />';	
}
?>	
	</td>
  	</tr>
<?php } if($ConfigArticleClick==1){?>
  <tr class="odd">
    <td height="22" align="right">点击次数：</td>
    <td><?php echo $aRs['ArticleClick'];?></td>
  </tr>
<?php } if($ConfigArticleSort==1){?>  
  <tr class="odd">
    <td height="22" align="right">排 序 数：</td>
    <td><?php echo $aRs['ArticleSort'];?></td>
  </tr>
<?php }?>  
  <tr class="odd">
    <td height="22" align="right">添加时间：</td>
    <td><?php echo $aRs['ArticleTime'];?></td>
  </tr>
<?php
//自定义字段
foreach ($page_field as $i => $n){
	$ntext = $aRs[$n[0]];
	if($n[2] == 'IMGVARCHAR'){
		if(file_exists("../{$ntext}") && !empty($ntext)){
			$ntext = "<a href=\"../{$ntext}\" onclick=\"return hs.expand(this);\"><img src=\"../{$ntext}\" width=\"160\" border=\"0\"></a>";	
		} else {
			$ntext = '<img src="images/noimg.gif" width="150" height="150" border="0" />';	
		}		
	}
	echo "<tr class=\"odd\">
    <td align=\"right\">{$n[1]}：</td>
    <td>{$ntext}</td>
	</tr>";
}
//End
?>  
  <tr class="odd">
  	<td align="right">关 键 词：</td>
  	<td><?php echo $aRs['ArticleKeyWord'];?></td>
  	</tr>
  <tr class="odd">
    <td align="right">详细内容：</td>
    <td style="padding:10px; line-height:20px;"><?php echo $aRs['ArticleContent'];?></td>
  </tr>
   <tr class="odd">
    <td height="22" align="right">内容来源：</td>
    <td><?php echo $aRs['ArticleSource'];?></td>
  </tr>
  <tr class="odd">
    <td height="22" align="right">发 布 人：</td>
    <td><?php echo $aRs['ArticlePublished'];?></td>
  </tr> 
  <tr class="odd">
    <td height="22" align="right">通过审核：</td>
    <td><?php echo $aRs['ArticleAudit']==0 ? '否' : '是';?></td>
  </tr>
  <tr class="odd">
    <td height="22" align="right">是否推荐：</td>
    <td><?php echo $aRs['ArticleRecommended']==0 ? '否' : '是';?></td>
  </tr>
  <tr class="odd">
    <td height="30" align="right">&nbsp;</td>
    <td><input type="button" value="返 回" class="submit" onClick="javascript:location.href='PageManage.php?Lang=<?php echo $Lang;?>';">
    &nbsp;&nbsp;&nbsp;&nbsp;
    <input type="button" value="修 改" class="submit" onClick="javascript:location.href='PageUpDate.php?Lang=<?php echo $aRs['ArticleLang'];?>&ID=<?php echo $_GET['ID']?>';">
    </td>
  </tr>
  </table>
</body>
</html>
